-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli: Warn on sizes above 10MB during solana rent
#922
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this a warning instead, as the description states?
5e83cb9
to
5a9eaa2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! Just a couple of extra suggestions to make this as useful as possible.
cli/src/cluster_query.rs
Outdated
@@ -2181,6 +2181,9 @@ pub fn process_calculate_rent( | |||
data_length: usize, | |||
use_lamports_unit: bool, | |||
) -> ProcessResult { | |||
if data_length > 10_000_000 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use
pub const MAX_PERMITTED_DATA_LENGTH: u64 = 10 * 1024 * 1024; |
697f084
to
6494121
Compare
6494121
to
608e9b6
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #922 +/- ##
=========================================
- Coverage 81.9% 81.9% -0.1%
=========================================
Files 853 853
Lines 231812 231814 +2
=========================================
Hits 189867 189867
- Misses 41945 41947 +2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution!
solana rent
Problem
The CLI command
$ solana rent <DATA_LENGTH_OR_MONIKER>
calculates the rent even if DATA_LENGTH is greater than 10 MB - which is the maximum size for a single account. The CLI tool should give a warning to avoid misleading the user.Summary of Changes
Added the check for it.